#ifndef _USART_H_
#define _USART_H_

#include "fm33lc0xx.h"
#include "fm33lc0xx_fl.h"

#define USART0_BUFFMAXSIZE  (128)
#define USART4_BUFFMAXSIZE  (128)

typedef struct{
    uint8_t RxBuff[USART0_BUFFMAXSIZE];
    uint16_t RxBuffTail;
    uint16_t RxBuffHead;   
}COM0_TypeDef;

typedef struct{
    uint8_t RxBuff[USART4_BUFFMAXSIZE];
    uint16_t RxBuffTail;
    uint16_t RxBuffHead;   
}COM4_TypeDef;

void USART0_InitConfig(uint32_t bps);
void USART0_ReceiveIntertupt_InitConfig(void);
void USART4_InitConfig(uint32_t bps);
void USART4_ReceiveIntertupt_InitConfig(void);

extern COM4_TypeDef COM4;
extern COM0_TypeDef COM0;
#endif //!_USART_H_
